﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace LibraryHub.DataAccess.EntityFramework
{
    public class EfBook
    {
        public int Id { get; set; }

        [Required]
        [MinLength(1)]
        [MaxLength(64)]
        public string Title { get; set; }

        [Required]
        [MinLength(1)]
        public string Description { get; set; }

        public bool IsTaken { get; set; }

        public virtual ICollection<EfLibraryOperation> Operations { get; set; }


        public EfBook()
        {
            Operations = new List<EfLibraryOperation>();
        }
    }
}